<%@include file="/WEB-INF/taglibs/common/taglibs.jsp"%>

<!-- dhtml libraries -->
<script type="text/javascript"
	src="<%=request.getContextPath()%>/javascripts/jquery/core/jquery-1.4.2.min.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/javascripts/jquery/plugins/validator/jquery.validate.js"></script>
<script type="text/javascript"
	src='<%=request.getContextPath()%>/javascripts/jquery/plugins/theme/<%=(String) request.getSession().getAttribute("uiTheme")%>/js/jquery-ui-1.8.5.custom.min.js'></script>
<link
	href='<%=request.getContextPath()%>/javascripts/jquery/plugins/theme/<%=(String) request.getSession().getAttribute("uiTheme")%>/css/jquery-ui-1.8.5.custom.css'
	rel="stylesheet" type="text/css">

<!-- dhtml libraries -->
<script type="text/javascript">
	$(document).ready(function() {
		var selectedLink="";
		var endindex=document.location.href.length;
		if(document.location.href.indexOf('?')>0)
			endindex=document.location.href.indexOf('?');
		if(document.location.href.indexOf('/admin/')>-1){
			selectedLink=document.location.href.substring(document.location.href.indexOf('/admin/'),endindex);
		}else if(document.location.href.indexOf('/serviceprovider/')>-1){
			selectedLink=document.location.href.substring(document.location.href.indexOf('/serviceprovider/'),endindex);
		}else {
			selectedLink=document.location.href.substring(document.location.href.indexOf('/users/'),endindex);
		}
		$("#menu li ").each(function(){
				if($(this).find('a').attr('href').indexOf(selectedLink)>-1)
					$(this).addClass("ui-state-active");
		});

		$("#submenu li ").each(function(){
			if($(this).find('a').attr('href').indexOf(selectedLink)>-1){
				$(this).addClass("ui-state-hover");
				var mainMenuLink=$("#submenu").attr('parent');
				$("#menu li ").each(function(){
					if($(this).find('a').attr('href').indexOf(mainMenuLink)>-1)
						$(this).addClass("ui-state-active");
				});
			}
		});
		$("#menu li").addClass("ui-state-default");
		$("#menu li").hover(function() {
			$(this).addClass("ui-state-hover");
		}, function() {
			$(this).removeClass("ui-state-hover");
		}).mousedown(function() {
			$(this).addClass("ui-state-active");
		}).css({
			'cursor' : 'pointer'
		});
		$("#submenu li").addClass("ui-widget-content");
		$("#submenu li").hover(function() {
			$(this).addClass("ui-state-hover");
		}, function() {
			$(this).removeClass("ui-state-hover");
		}).mousedown(function() {
			$(this).addClass("ui-state-active");
		}).css({
			'cursor' : 'pointer'
		});
		$(".headerLink").mouseover(function(){
			$(this).addClass('ui-state-highlight');
		}).mouseout(function(){
			$(this).removeClass('ui-state-highlight');
		}).css({'cursor':'pointer','width':'5.5em','color':'black'});

	});

</script>

<h1>
	<spring:message code="admin.menu.title" />
</h1>
<c:import url="/WEB-INF/jsp/languageselection.jsp" />
<ul id="menu">
	<li>
		<a href="<c:url value="/admin/adminHome.htm"/>" title="">
			<spring:message code="admin.menu.home" />
		</a>
	</li>
	<li>
		<a href="<c:url value="/admin/order/view_orders.htm"/>" title="">
			<spring:message code="admin.menu.order" />
		</a>
	</li>
	<li>
		<a href="<c:url value="/serviceprovider/reports/reports.htm" />">
			<spring:message code="admin.menu.reports" />
		</a>
	</li>
	<li>
		<a href="<c:url value="/users/view_users.htm"/>" title="">
			<spring:message code="admin.menu.users" />
		</a>
	</li>
<%--
	<li>
		<a href="<c:url value="/admin/role/view_roles.htm"/>" title="">
			<spring:message code="admin.menu.roles" />
		</a>
	</li>
--%>
	<li>
		<a href="<c:url value="/admin/license/view_licenses.htm"/>" title="">
			<spring:message code="admin.menu.licenses" />
		</a>
	</li>
<%--
     Temporarily commented out due to missing functionality
     tryk, 08.01.2012
	<li>
		<a href="<c:url value="/admin/acl/view_acl_classes.htm"/>" title="">
			<spring:message code="admin.menu.aclclasses" />
		</a>
	</li>
	<li>
		<a href="<c:url value="/admin/action/view_actions.htm"/>" title="">
			<spring:message code="admin.menu.actions" />
		</a>
	</li>
--%>
	<li>
		<a href="<c:url value="/admin/bonus/view_bonuses.htm"/>" title="">
			<spring:message code="admin.menu.bonus" />
		</a>
	</li>
	<li>
		<a href="<c:url value="/admin/messages/list.htm"/>" title="">
			<spring:message code="admin.menu.messages" />
		</a>
	</li>
	<li>
		<a href="<c:url value="/admin/transaction/transaction_summary.htm"/>" title="">
			<spring:message code="admin.menu.transactions" />
		</a>
	</li>
	<li>
		<a href="<c:url value="/admin/sitesettings/settings.htm"/>" title="">
			<spring:message code="admin.menu.settings" />
		</a>
	</li>
	<li>
		<a href="<c:url value="/admin/faq/faq_question.htm"/>" title="">
			<spring:message code="admin.menu.faq" />
		</a>
	</li>
	<li>
		<a href="<c:url value="/login/logon.htm"/>" title="">
			<spring:message code="admin.menu.exit" />
		</a>
	</li>
</ul>